<!--
 * @Author: Shiire
 * @Date: 2022-02-16 15:30:00
 * @LastEditors: Shiire
 * @LastEditTime: 2022-08-08 18:58:21
 * @Description: 
 * @FilePath: \grapro\src\App.vue
-->
<template>
  <div id="app">
    <router-view />
  </div>
</template>

<style lang="scss">
#app {
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;

  img {
    object-fit: cover;
  }
}
</style>


<script>
import jwt_decode from "jwt-decode";
export default {
  created() {
    this.$socket.open(); // 开始连接socket

    const token = localStorage.getItem("token");
    const decoded = jwt_decode(token);
    this.$socket.emit("sendUid", decoded.uid);
  },
};
</script>

